Skip to content

feat: integrate MAAS framework into MASLab with dual mode support and…#2

Open
Confident-Huangduer wants to merge 1 commit into
MASWorks:mainfrom
Confident-Huangduer:feature/integrate-maas-framework
Open

feat: integrate MAAS framework into MASLab with dual mode support and…#2
Confident-Huangduer wants to merge 1 commit into
MASWorks:mainfrom
Confident-Huangduer:feature/integrate-maas-framework

Conversation

@Confident-Huangduer

Copy link
Copy Markdown

功能概述

本PR将MAAS(Multi-Agent Architecture Search)框架集成到MASLab中,提供了多智能体架构搜索的能力。

主要更改

核心功能

  • 完整的MAAS框架集成:添加了完整的MAAS框架代码,包含多智能体架构搜索功能
  • 双模式支持:支持推理模式(inference)和训练模式(training)
  • 无缝集成:MAAS_Main类继承自MAS基类,完全兼容MASLab架构
  • 数据格式转换:自动将MASLab的JSON格式转换为MAAS需要的JSONL格式

关键文件

  • methods/maas/maas_main.py:主要集成类
  • methods/maas/configs/:配置文件目录
  • methods/maas/maas_config_patch.py:配置系统补丁
  • methods/maas/maas_graph_loader_patch.py:Windows兼容性修复
  • methods/maas/MASLAB_INTEGRATION.md:集成文档

@bingreeky

Copy link
Copy Markdown

请问可以麻烦再看一下这个PR吗?感谢

@HuangAdd9

Copy link
Copy Markdown
Collaborator

我们认真review了您的repo,不过目前有300+文件,进行全面code review需要较长时间。能否请您移除非运行时文件,统一配置文件(yaml),精简核心代码,这样您的算法能被其他开发者快速理解。这也是我们做MASLab的初衷,尽可能把不同repo的写法统一,降低算法理解门槛。

@bingreeky

Copy link
Copy Markdown

感谢回复!MaAS的代码很大程度上依赖于AFlow,如果您可以把论文里复现aflow的代码开源的话,MaAS就可以比较轻量地引入;我也看到有issue #1 里回复说一周内会开aflow,想问问你们具体的安排~再次感谢🙏

Daisy-bit pushed a commit to Daisy-bit/MASLab that referenced this pull request May 25, 2026
…rate eigenvalue

P1 fixes (real / experiment-impacting bugs):

  * mad_scc code task: `_vote`/`_group_for_diag` now uses body-stripped BLEU
    for clustering (matches scc_components.voting._code_bleu_plurality).
    Previously full-code BLEU was used, so trigger (count_first_plurality,
    body-stripped) and vote (_group_for_diag, full-code) could disagree on
    cluster membership when agents used same logic with different
    docstrings. Verified: two `def add(a,b)` with different docstrings
    now correctly cluster as one group.

  * inference.py --sequential: process_sample() was called with 4 args but
    the function signature requires 5 (lock missing). Sequential mode
    crashed with TypeError immediately. Added the missing lock arg.

  * pc1_contributions: when all embeddings are identical, S_c ≈ 0 and eigh
    picks an arbitrary orthonormal basis. The leading "eigenvector" carries
    no information, but softmax(|v_1|) would give one random agent ~100%
    weight. Now detects raw_lam1 < 1e-10 and returns uniform 1/N.
    Verified: 5 identical embs now yield [0.2]*5 instead of [~1, ~0, ~0, ~0, ~0].

P2 fixes (consistency):

  * mad_scc/soo_scc pool-size handling unified to `>=`. mad_scc previously
    required strict equality (rejected oversized pools), soo_scc accepted
    and sliced. Now both accept `>=` and use the first N entries.

  * task_typing._MCQ_SOURCES now includes aqua-rat, medmcqa, medqa.
    Previously these relied on the option-pattern fallback in
    _query_looks_like_mcq, which has false-positive risk for math
    problems mentioning "(A)" patterns.

Round 3 P3+ findings deferred per "只修 P1 三条 + P2 顺手两条" decision:
  R1-MASWorks#2/MASWorks#3/MASWorks#4/MASWorks#7/MASWorks#8, R2-M2/M3/M6/M7/M8/M9/M10, R3-C2/C3/C5/C6.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants